package com.org.csu.common;

import java.util.List;
public class AccountResponse<T> {
    private int code;       // 返回的状态码
    private String message; // 返回的消息
    private T data;         // 返回的数据，使用泛型以适应不同类型的数据结构

    // 构造方法
    public AccountResponse(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public AccountResponse(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    // Getter 和 Setter 方法
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "AccountResponse{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }

}
